package com.lin.cloud.disk.document;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * mongoDB 文件目录闭包文档表
 * @author ljc
 * @date 2021/1/22 17:32
 */
@Data
@Document(collection = "directory_closure", language = "utf-8")
public class DirectoryClosureDocument {

    public static final String COLLECTION_NAME = "directory_closure";
    private static final long serialVersionUID = 1L;

    @Id
    private Long id;

    /**
     * 祖先节点ID
     */
    private Long ancestor;

    /**
     * 子孙节点ID
     */
    private Long descendant;

    /**
     * 距离 0 同级
     */
    private Integer distance;

    /**
     * 公司ID
     */
    private Long companyId;

    /**
     * 是否为Root目录 0 不是 1 是
     */
    private Integer isRoot;
}
